package com.shangxia.dog.base.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shangxia.dog.base.entity.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shangxia.dog.base.entity.Role;
import com.shangxia.dog.commom.vo.PageResult;
import com.shangxia.dog.commom.vo.ResultVO;
import com.shangxia.dog.vo.User;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author shangxia
 * @since 2022-02-03
 */
public interface IAdminService extends IService<Admin> {

    ResultVO<String> login(String username, String password, String code, HttpServletRequest request);

    Admin getRolesById(String username);

    List<Role> getRolesById(Long id);

    List<Admin> listUsers();

    void addAdmin(Admin admin);

    Page<Admin> listUsersByPage(PageResult<User> page);

    void deleteUser(Long id);

    void updateUser(Admin admin);
}
